package com.ninemax.personel.window;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JToolBar;
import javax.swing.JButton;
import javax.swing.JTree;
import javax.swing.JTextPane;
import java.awt.TextField;
import javax.swing.JList;

public class Main extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Main frame = new Main();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Main() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 598, 527);
		
		JMenuBar menuBar = new JMenuBar();
		setJMenuBar(menuBar);
		
		JMenu menu = new JMenu("文件");
		menuBar.add(menu);
		JMenu menu_1 = new JMenu("打开");
		menu.add(menu_1);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JToolBar toolBar = new JToolBar();
		toolBar.setBounds(5, 5, 572, 23);
		contentPane.add(toolBar);
		
		JButton btnTest = new JButton("test");
		toolBar.add(btnTest);
		
		JTextPane txtpnHelloWorld = new JTextPane();
		txtpnHelloWorld.setBounds(15, 127, 548, 200);
		txtpnHelloWorld.setText("Hello   world");
		contentPane.add(txtpnHelloWorld);
		
		TextField textField = new TextField();
		textField.setBounds(15, 34, 535, 63);
		contentPane.add(textField);
		
		JList list = new JList();
		list.setBounds(24, 197, 1, 1);
		contentPane.add(list);
	}
}
